< previous page page_197 next page >

Page 197
        wYear As Integer
        wMonth As Integer
        wDayOfWeek As Integer
        wDay As Integer
        wHour As Integer
        wMinute As Integer
        wSecond As Integer
        wMilliseconds As Integer
End Type


Private Type TIME_ZONE_INFORMATION
        Bias As Long
        StandardName(63) As Byte
        StandardDate As SYSTEMTIME
        StandardBias As Long
        DaylightName(63) As Byte
        DaylightDate As SYSTEMTIME
        DaylightBias As Long
End Type

Private Declare Function GetTimeZoneInformation Lib _
"kernel32" (lpTimeZoneInformation As TIME_ZONE_INFORMATION) As Long

Private Const TIME_ZONE_ID_INVALID = &HFFFFFFFF
Private Const TIME_ZONE_ID_UNKNOWN = 0
Private Const TIME_ZONE_ID_STANDARD = 1
Private Const TIME_ZONE_ID_DAYLIGHT = 2

Private Sub Form_Load()
   Dim tz As TIME ZONE INFORMATION
   Dim info As String
   Dim res As Long
   Dim timezonename As String
   Dim nulloffset As Long
   res = GetTimeZoneInformation(tz)
   Select Case res
      Case TIME_ZONE_ID_INVALID
         lblTimeZone.Caption = "GetTimeZoneInformation function failed." _
         & vbCrLf
         lblTimeZone.Caption = lblTimeZone.Caption & "Error: " _
         & GetErrorString(Err.LastDllError)
      Case TIME_ZONE_ID_UNKNOWN

 
< previous page page_197 next page >